//
//  MYGCaseFilesModel.swift
//  MYGrow
//
//  Created by 小火科技 on 2024/4/9.
//

import HandyJSON

class MYGCaseListFileModel : HandyJSON {
    var id = 0
    var user_id = 0
    var patient_id = 0
    var hospital = ""
    var visit_time = ""
    var department = ""
    var outpatient:[MYGCaseSubListFileModel] = []
    var inspection:[MYGCaseSubListFileModel] = []
    var medication:[MYGCaseSubListFileModel] = []
    var operation:[MYGCaseSubListFileModel] = []
    var examination:[MYGCaseSubListFileModel] = []
    var created_at = ""
    var updated_at = ""
    var deleted_at = ""
    
    required init() {
    }
}

class MYGCaseSubListFileModel:HandyJSON {
    var imag:[String] = []
    var info = ""
    var time = ""
    var doctor = ""
    var zdTime = ""
    var hospital = ""
    var department = ""
    
    required init() {
    }
    
}


class MYGCaseModel : HandyJSON {
    var success = ""
    var data:[MYGCaseSubFileModel] = []
    var msg = ""
    var status = ""

    required init() {
    }
}

class MYGCaseSubFileModel : HandyJSON {
    var count = 0
    var months:[MYGCaseFilesModel] = []
    var year = ""
    
    required init() {
    }
}

class MYGCaseFilesModel: HandyJSON {
    var month = ""
    var count = 0
    var lists:[MYGCaseSubModel] = []
    var month_name = ""
    
    required init() {
    }
    
}

class MYGCaseSubModel: HandyJSON {
    var department = ""
    var id = 0
    var visit_time = ""
    var hospital = ""
    var outpatient:MYGCaseOptModel = MYGCaseOptModel()
    
    required init() {
    }
    
}

class MYGCaseOptModel: HandyJSON {
    var other:String?
    var selected:[ String]?
    var name:String?
    var images:[String]?
    var img:[String]?
    var info:String?
    var time:String?
    var doctor:String?
    var zdTime:String?
    var hospital:String?
    var department:String?
    
    required init() {
    }
    
}


class MYGSubjectsModel: HandyJSON {
    var value = 0
    var label = ""
    required init() {
    }
    
}


class MYGHealthStastiscSugarModel: HandyJSON {
    var measure_at = ""
    var state_txt = ""
    var state = 0
    var blood_glucose_level = 0.0
    var id: Int = 0
    var percentage = ""
    var hba1c_value = ""
    required init() {
        
    }
}


class MYGHealthStastiscPressureModel: HandyJSON {
    var systolic_pressure = 0 // 收缩压 高
    var diastolic_pressure = 0 // 舒张压 低
    var measure_at = "" // 测量时间
    var state_txt = ""
    var state = 0
    var id: Int = 0
    var percentage = ""
    required init() {
        
    }
}

class MYGHealthStastiscHeartModel: HandyJSON {
    var heart_rate_value = 0
    var measure_at = ""
    var state_txt = ""
    var state = 0
    var id: Int = 0
    var percentage = ""
    required init() {
        
    }
}

class MYGHealthStastiscBMIModel: HandyJSON {
    var id: Int = 0
    var measure_at = ""
    var state_txt = ""
    var state = 0
    var height = 0.0
    var weight = 0.0
    var percentage = ""
    var bmi: Float {
        get {
            if height == 0 { return 0}
            return Float(weight / ((height/100.0) * (height/100.0)))
        }
    }
    required init() {
        
    }
}
